package com.peoit.honeycomb.domain;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "honeycomb_comments")
public class Comments extends BaseEntity {

	/**
	 * serialVersionUID
	 */
	private static final long serialVersionUID = 1L;

	public Comments() {
		super();
	}

	@Column(length = 256, nullable = true)
	private String comments;

	/**
	 * project
	 */
	@ManyToOne(cascade = { CascadeType.REFRESH, CascadeType.MERGE }, optional = false)
	@JoinColumn(name = "project_id")
	private HoneycombProject project;

	/**
	 * user
	 */
	@ManyToOne(cascade = { CascadeType.REFRESH, CascadeType.MERGE }, optional = false)
	@JoinColumn(name = "user_id")
	private User discussant;

	public String getComments() {
		return comments;
	}

	public void setComments(String comments) {
		this.comments = comments;
	}

	public HoneycombProject getProject() {
		return project;
	}

	public void setProject(HoneycombProject project) {
		this.project = project;
	}

	public User getDiscussant() {
		return discussant;
	}

	public void setDiscussant(User discussant) {
		this.discussant = discussant;
	}
}
